package com.amazon.spring8amazon.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 平台账号表
 * @TableName yibai_system_account
 */
@TableName(value ="yibai_system_account")
@Data
public class YibaiSystemAccount implements Serializable {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 平台code
     */
    private String platformCode;

    /**
     * 对应其他系统账号表id
     */
    private Integer erpId;

    /**
     * 各系统对应账号id
     */
    private Integer accountId;

    /**
     * 账号名称
     */
    private String accountName;

    /**
     * 账号简称
     */
    private String shortName;

    /**
     * 店铺名称
     */
    private String shopName;

    /**
     * 平台返回id
     */
    private String shopId;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 站点code
     */
    private String siteCode;

    /**
     * 状态1启用2停用
     */
    private Integer status;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    private Integer createdUnix;

    /**
     * 修改人
     */
    private String updatedBy;

    /**
     * 修改时间
     */
    private Integer updatedUnix;

    /**
     * 是否sip账号
     */
    private Integer isSip;

    /**
     * 是否删除 默认is_del=0是没有删除
     */
    private Integer isDel;

    /**
     * 销售员
     */
    private String sellerId;

    /**
     * 商户ID
     */
    private String merchantId;

    /**
     * 子商户ID
     */
    private String authMerchantId;

    /**
     * 验证码密码
     */
    private String authcodeSecretKey;

    /**
     * 0 无、1、个人类型 2、企业（店铺类型）
     */
    private Integer accountType;

    /**
     * account_num
     */
    private String accountNum;

    /**
     * 是否平台仓账号 1否 2是
     */
    private Integer isPlatformAccount;

    /**
     * 个人税/企业税 1个人税 2企业税
     */
    private Integer raxType;

    /**
     * 账号沉予字段
     */
    private String data;

    /**
     * 开发者访问地址
     */
    private String host;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        YibaiSystemAccount other = (YibaiSystemAccount) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPlatformCode() == null ? other.getPlatformCode() == null : this.getPlatformCode().equals(other.getPlatformCode()))
            && (this.getErpId() == null ? other.getErpId() == null : this.getErpId().equals(other.getErpId()))
            && (this.getAccountId() == null ? other.getAccountId() == null : this.getAccountId().equals(other.getAccountId()))
            && (this.getAccountName() == null ? other.getAccountName() == null : this.getAccountName().equals(other.getAccountName()))
            && (this.getShortName() == null ? other.getShortName() == null : this.getShortName().equals(other.getShortName()))
            && (this.getShopName() == null ? other.getShopName() == null : this.getShopName().equals(other.getShopName()))
            && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getSiteCode() == null ? other.getSiteCode() == null : this.getSiteCode().equals(other.getSiteCode()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
            && (this.getCreatedUnix() == null ? other.getCreatedUnix() == null : this.getCreatedUnix().equals(other.getCreatedUnix()))
            && (this.getUpdatedBy() == null ? other.getUpdatedBy() == null : this.getUpdatedBy().equals(other.getUpdatedBy()))
            && (this.getUpdatedUnix() == null ? other.getUpdatedUnix() == null : this.getUpdatedUnix().equals(other.getUpdatedUnix()))
            && (this.getIsSip() == null ? other.getIsSip() == null : this.getIsSip().equals(other.getIsSip()))
            && (this.getIsDel() == null ? other.getIsDel() == null : this.getIsDel().equals(other.getIsDel()))
            && (this.getSellerId() == null ? other.getSellerId() == null : this.getSellerId().equals(other.getSellerId()))
            && (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId()))
            && (this.getAuthMerchantId() == null ? other.getAuthMerchantId() == null : this.getAuthMerchantId().equals(other.getAuthMerchantId()))
            && (this.getAuthcodeSecretKey() == null ? other.getAuthcodeSecretKey() == null : this.getAuthcodeSecretKey().equals(other.getAuthcodeSecretKey()))
            && (this.getAccountType() == null ? other.getAccountType() == null : this.getAccountType().equals(other.getAccountType()))
            && (this.getAccountNum() == null ? other.getAccountNum() == null : this.getAccountNum().equals(other.getAccountNum()))
            && (this.getIsPlatformAccount() == null ? other.getIsPlatformAccount() == null : this.getIsPlatformAccount().equals(other.getIsPlatformAccount()))
            && (this.getRaxType() == null ? other.getRaxType() == null : this.getRaxType().equals(other.getRaxType()))
            && (this.getData() == null ? other.getData() == null : this.getData().equals(other.getData()))
            && (this.getHost() == null ? other.getHost() == null : this.getHost().equals(other.getHost()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPlatformCode() == null) ? 0 : getPlatformCode().hashCode());
        result = prime * result + ((getErpId() == null) ? 0 : getErpId().hashCode());
        result = prime * result + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
        result = prime * result + ((getAccountName() == null) ? 0 : getAccountName().hashCode());
        result = prime * result + ((getShortName() == null) ? 0 : getShortName().hashCode());
        result = prime * result + ((getShopName() == null) ? 0 : getShopName().hashCode());
        result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getSiteCode() == null) ? 0 : getSiteCode().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
        result = prime * result + ((getCreatedUnix() == null) ? 0 : getCreatedUnix().hashCode());
        result = prime * result + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
        result = prime * result + ((getUpdatedUnix() == null) ? 0 : getUpdatedUnix().hashCode());
        result = prime * result + ((getIsSip() == null) ? 0 : getIsSip().hashCode());
        result = prime * result + ((getIsDel() == null) ? 0 : getIsDel().hashCode());
        result = prime * result + ((getSellerId() == null) ? 0 : getSellerId().hashCode());
        result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode());
        result = prime * result + ((getAuthMerchantId() == null) ? 0 : getAuthMerchantId().hashCode());
        result = prime * result + ((getAuthcodeSecretKey() == null) ? 0 : getAuthcodeSecretKey().hashCode());
        result = prime * result + ((getAccountType() == null) ? 0 : getAccountType().hashCode());
        result = prime * result + ((getAccountNum() == null) ? 0 : getAccountNum().hashCode());
        result = prime * result + ((getIsPlatformAccount() == null) ? 0 : getIsPlatformAccount().hashCode());
        result = prime * result + ((getRaxType() == null) ? 0 : getRaxType().hashCode());
        result = prime * result + ((getData() == null) ? 0 : getData().hashCode());
        result = prime * result + ((getHost() == null) ? 0 : getHost().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", platformCode=").append(platformCode);
        sb.append(", erpId=").append(erpId);
        sb.append(", accountId=").append(accountId);
        sb.append(", accountName=").append(accountName);
        sb.append(", shortName=").append(shortName);
        sb.append(", shopName=").append(shopName);
        sb.append(", shopId=").append(shopId);
        sb.append(", email=").append(email);
        sb.append(", siteCode=").append(siteCode);
        sb.append(", status=").append(status);
        sb.append(", createdBy=").append(createdBy);
        sb.append(", createdUnix=").append(createdUnix);
        sb.append(", updatedBy=").append(updatedBy);
        sb.append(", updatedUnix=").append(updatedUnix);
        sb.append(", isSip=").append(isSip);
        sb.append(", isDel=").append(isDel);
        sb.append(", sellerId=").append(sellerId);
        sb.append(", merchantId=").append(merchantId);
        sb.append(", authMerchantId=").append(authMerchantId);
        sb.append(", authcodeSecretKey=").append(authcodeSecretKey);
        sb.append(", accountType=").append(accountType);
        sb.append(", accountNum=").append(accountNum);
        sb.append(", isPlatformAccount=").append(isPlatformAccount);
        sb.append(", raxType=").append(raxType);
        sb.append(", data=").append(data);
        sb.append(", host=").append(host);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }


    private YibaiAmazonPublishSkuSelectResult yibaiAmazonPublishSkuSelectResult;  // 账号表连接刊登选品表时候变量使用

    private List<YibaiAmazonPublishSkuSelectResult> yibaiAmazonPublishSkuSelectResultList;  // 账号表连接刊登选品表时候变量使用

}